package com.example.mybatis.controller;

import com.example.mybatis.pojo.Draft;
import com.example.mybatis.service.DraftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/draft/")
public class DraftController {
    @Autowired
    private DraftService draftService;

    @ResponseBody
    @RequestMapping("selectOneToMany")
    public List<Draft> selectOneToMany(){
        return draftService.selectOneToMany();
    }
}
